home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr15
/
rtag10.zip
/
TOUR.RTA
< prev
next >
Wrap
Text File
|
1993-05-24
|
2KB
|
50 lines
// Animated tour around some buildings
// File declarations
bfile tour // Batch file
// Variable declarations.
var lastframe = 260 // Generate 260 frame animation
var x // X position
var y // Y position
var z // Z position
var xlook // X to look at
var ylook // Y to look at
var zlook // Z to look at
// Main animation loop
while (curframe < lastframe) do
nextframe // Begin a new frame
// Determine position
x = spline(curframe, 1,22, 15,14, 30,6, 45,2, 60,-6, \\
75,1, 90,2, 105,4, 120,6, 135,6, 150,4, \\
170,-4, 185,-8, 200,-4, 215,-1, 230,2, \\
240,4, 260,12);
y = spline(curframe, 1,15, 15,12, 30,6, 45,2, 60,1, \\
75,2, 90,2, 170,2, 200,2, 230,4, 240,8, 260,18);
z = spline(curframe, 1,-18, 15,-2, 30,-1, 45,-3, 60,0, \\
75,2, 90,-4, 105,-6, 120,-3, 135,3, \\
150,6, 170,8, 185,6, 200,2, 215,-4, \\
230,-2, 240,0, 260,0);
// Determine where to look
xlook = spline(curframe, 1,0, 30,-8, 45,-8, 60,-7, 75,9, 90,4, \\
105,4, 120,0, 200,0, 260,0);
ylook = spline(curframe, 1,2, 260,2);
zlook = spline(curframe, 1,0, 30,0, 45,0, 60,6, 75,-4, 90,-4, \\
120,0, 150,0, 200,0, 260,0);
// Print our position
print "Frame %3.0lf, pos=(%4.1lf,%4.1lf,%4.1lf), look=(%4.1lf,%4.1lf,%4.1lf)",\\
curframe,x,y,z,xlook,ylook,zlook
// Write position commands to the include file
bwrite "echo #declare xpos = `x` > tour.inc"
bwrite "echo #declare ypos = `y` >> tour.inc"
bwrite "echo #declare zpos = `z` >> tour.inc"
bwrite "echo #declare xlook = `xlook` >> tour.inc"
bwrite "echo #declare ylook = `ylook` >> tour.inc"
bwrite "echo #declare zlook = `zlook` >> tour.inc"
// Write command to render the frame image
bwrite "call render tour tour`###`"
endwhile
// Write final batch command to run DTA
epilog
bwrite "call dodta TOUR /S8"